<%@ page import="com.wyix.model.Book" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>图书列表（JSP）</title>
</head>
<body>
<h1>图书列表</h1>
<table>
    <tr>
        <th>ID</th>
        <th>书名</th>
        <th>作者</th>
    </tr>
    <% for (Book book : (List<Book>) request.getAttribute("books")) { %>
    <tr>
        <td><%= book.getId() %>
        </td>
        <td><%= book.getName() %>
        </td>
        <td><%= book.getAuthor() %>
        </td>
    </tr>
    <% } %>
</table>
</body>
</html>